<?php 
/**
 * 关于物品转移的控制类
 * @author Sky
 *
 */
class ControllerProductMovelog extends Controller {
	public function index() {
		
	}
	
	/**
	 * ///sky:ajax提交物品转移请求
	 */
	public function sendMoveRequire(){
		$this->language->load('product/product');
		$this->load->model('catalog/movelog');
		
		$movelog_id = $this->model_catalog_movelog->addMovelog($this->request->post);
		$json = array();
		$json['success'] = $this->language->get('text_success_moved');
		$json['movelog_id'] = $movelog_id;
		$this->response->setOutput(json_encode($json));
	}
	
	/**
	 * ///sky:ajax提交取消物品转移请求
	 */
	public function cancelMoveRequire(){
		$this->language->load('product/product');
		$this->load->model('catalog/movelog');
		
		$movelog_id = $this->request->post['movelog_id'];
		$this->model_catalog_movelog->setMovelogStatus($movelog_id, '0'); //将状态改为取消
		
		$json = array();
		$json['success'] = $this->language->get('text_success_move_cancel');
		$this->response->setOutput(json_encode($json));
	}
}  